<template>
  <div class="box">
    <van-nav-bar
      title="登录"
      left-arrow
      @click-left="$router.go(-1)"
      @click-right="onClickRight"
    />
    <h2>优点达资讯</h2>
    <van-form @submit="onSubmit">
      <van-field
        left-icon="manager"
        v-model="username"
        name="用户名"
        label="用户名"
        placeholder="请输入手机号"
        :rules="[{ required: true, message: '请输入手机号' }]"
      />

      <van-field
        left-icon="lock"
        v-model="password"
        type="password"
        name="密码"
        label="密码"
        placeholder="密码"
        :rules="[{ required: true, message: '密码' }]"
      />
      <div style="margin: 16px">
        <van-button round block type="info" native-type="submit"
          >提交</van-button
        >
      </div>
    </van-form>
    <router-link to="/re">没有账号-去注册</router-link>
  </div>
</template>

<script>
export default {}
</script>

<style lang="less">
.box {
  h2 {
    padding: 20px 0;
    text-align: center;
    font-size: 30px;
    font-weight: 400;
    color: #1989fa;
  }
  a {
    display: block;
    text-align: right;
    padding-right: 30px;
    color: #ccc;
  }
}
.van-nav-bar {
  background-color: #1989fa;
  // icon图标
  .van-icon {
    color: #fff;
  }
  // 标题
  .van-ellipsis {
    color: #fff;
  }
}
</style>
